package com.wzx.data.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wzx.basics.baseClass.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.Map;

/**
 * 课程 实体类
 * @author wzx
 * @since 2023/03/20
 */
@Data

@DynamicInsert
@DynamicUpdate
@Table(name = "a_course")
@TableName("a_course")
@ApiModel(value = "课程")
public class Course extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 课程讲师Id
     */
    private String teacherId;

    /**
     * 科目Id
     */
    private String subjectId;

    /**
     * 科目父级Id
     */
    private String subjectParentId;

    /**
     * 课程标题
     */
    private String title;


    /**
     * 总课时
     */
    private Integer lessonNum;

    /**
     * 视频总时长（秒）
     */
    private Integer durationSum;

    /**
     * 课程封面图片路径
     */
    private String cover;

    /**
     * 浏览数量
     */
    private Long viewCount;

    /**
     * 课程状态 0未发布 1已发布
     */
    private Integer status;

    /**
     * 课程简介
     */
    private String description;
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime;

    /**
     * 其他参数
     */
    @TableField(exist = false)
    private Map param;


}